<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateOrdersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('orders', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id');
            $table->string('order_number', 100)->comment('订单号');
//            $table->decimal('total_amount', 10 ,2)->comment('订单金额');
            $table->string('status', 10)->comment('订单状态')->default('un_pay');
            $table->integer('bistro_id')->comment('餐馆id');
            $table->integer('position_id')->comment('座位id')->default(0);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('orders');
    }
}
